package com.qf.zyh.entity;


import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class EdocEntry implements Serializable {

  private int id;
  private int categoryId;
  private String title;
  private String summary;
  private String uploaduser;
  @DateTimeFormat(pattern = "yyyy-mm-dd")
  private Date createdate;
  private EdocCategory ec;

  public EdocEntry(int categoryId, String title, String summary, String uploaduser, Date createdate) {
    this.categoryId = categoryId;
    this.title = title;
    this.summary = summary;
    this.uploaduser = uploaduser;
    this.createdate = createdate;
  }

  public EdocEntry(int id, int categoryId, String title, String summary, String uploaduser, Date createdate) {
    this.id = id;
    this.categoryId = categoryId;
    this.title = title;
    this.summary = summary;
    this.uploaduser = uploaduser;
    this.createdate = createdate;
  }

  @Override
  public String toString() {
    return "EdocEntry{" +
            "id=" + id +
            ", categoryId=" + categoryId +
            ", title='" + title + '\'' +
            ", summary='" + summary + '\'' +
            ", uploaduser='" + uploaduser + '\'' +
            ", createdate=" + createdate +
            "--"+ ec +
            '}';
  }

  public EdocCategory getEc() {
    return ec;
  }

  public EdocEntry() {
  }

  public EdocEntry(int id, int categoryId, String title, String summary, String uploaduser, Date createdate, EdocCategory ec) {
    this.id = id;
    this.categoryId = categoryId;
    this.title = title;
    this.summary = summary;
    this.uploaduser = uploaduser;
    this.createdate = createdate;
    this.ec = ec;
  }

  public EdocEntry(int categoryId, String title, String summary, String uploaduser, Date createdate, EdocCategory ec) {
    this.categoryId = categoryId;
    this.title = title;
    this.summary = summary;
    this.uploaduser = uploaduser;
    this.createdate = createdate;
    this.ec = ec;
  }

  public void setEc(EdocCategory ec) {
    this.ec = ec;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }


  public int getCategoryId() {
    return categoryId;
  }

  public void setCategoryId(int categoryId) {
    this.categoryId = categoryId;
  }


  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }


  public String getSummary() {
    return summary;
  }

  public void setSummary(String summary) {
    this.summary = summary;
  }


  public String getUploaduser() {
    return uploaduser;
  }

  public void setUploaduser(String uploaduser) {
    this.uploaduser = uploaduser;
  }


  public Date getCreatedate() {
    return createdate;
  }

  public void setCreatedate(Date createdate) {
    this.createdate = createdate;
  }

}
